package com.cq.hd.member.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cq.hd.member.api.dto.BusinessPointsMallProductListDto;
import com.cq.hd.member.api.dto.BusinessPointsMallProductPageDto;
import com.cq.hd.member.api.vo.BusinessPointsMallProductPageVo;
import com.cq.hd.member.api.vo.BusinessPointsMallProductVo;
import com.cq.hd.member.po.TbBusinessPointsMallProductPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商家积分商城优惠券表 Mapper 接口
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-21
 */
@Mapper
public interface TbBusinessPointsMallProductMapper extends BaseMapper<TbBusinessPointsMallProductPo> {
    // 积分兑换，更新库存
    Boolean incUsedNum(@Param("id") Long id, @Param("originRemainNum") Integer originRemainNum);

    // 积分兑换，更新库存
    Boolean decUsedNum(@Param("id") Long id, @Param("originRemainNum") Integer originRemainNum);

    // 产品列表
    List<BusinessPointsMallProductVo> getProductList(BusinessPointsMallProductListDto productListDto);

    // 管理后台：商家积分商品列表
    List<BusinessPointsMallProductPageVo> adminPageProducts(BusinessPointsMallProductPageDto businessPointsMallProductPageDto);
}
